<?		
/**
* Copyright (c) 2002-2007 BioWare Corp.
* http://www.bigdaddymonitor.org
*
* This file is part of the BigDaddy Monitoring
* program. It is free software distributed under
* the terms of the BSD License. It is ditributed
* in the hopes that it will be useful, but
* WITHOUT ANY WARRANTY; without event the implied
* warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE.
*
* The BSD License is available from:
* http://www.opensource.org/licenses/bsd-license.php
**/

if ($displayParams["aFormDisplay"]["bShowFormTag"])
{
    // that table hack there is to get around the IE form display problem
    ?>
    <div class="wiki_content">

    <table border="0" cellspacing="0" cellpadding="0"><tr>
    <form style="" class="wiki_ktmlform" action="<?=$displayParams["aFormDisplay"]["action"];?>" method="<?=$displayParams["aFormDisplay"]["method"];?>" name="<?=$displayParams["aFormDisplay"]["sFormName"];?>" id="<?=$displayParams["aFormDisplay"]["sFormName"];?>">
    </tr>
    </table>
	
	<?

	include("button.php");

	if (is_array($displayParams["aConflict"]) && $displayParams["aConflict"]["bIsConflict"])
	{
	    if ($displayParams["aConflict"]["sMesg"]!="")
	    {
		?>
		<div id="wiki_warning">
		    This page has been checked out by
		<?//$displayParams["aConflict"]["sMesg"];?>
		
		<?
		if (is_array($displayParams["aConflict"]["aUser"]))
		{
		    $nElem=count($displayParams["aConflict"]["aUser"]);
		    for ($i=0; $i<$nElem; $i++)
		    {
		    ?>
			<a href="mailto:<?=$displayParams["aConflict"]["aUser"][$i]["sUsername"];?>@bioware.com">
			<?=$displayParams["aConflict"]["aUser"][$i]["sUsername"];?></a> at <?=$displayParams["aConflict"]["aUser"][$i]["sCheckOutTime"];?><?
		    
		    if ($i==$nElem-1)
		    {
			echo ".";
		    }
		    else
		    {
			echo ",";
		    }
		    
		    }
		}
		?>
		
		&nbsp;&nbsp;Please note that you may end up overwriting someone else's changes.
		
		</div>
		<?
	    }
	}	

	
	include("form.php");

	if (($displayParams["aEditCategory"]["bShowEditCategory"]) && (is_array($displayParams["aEditCategory"]["aCategory"])) )
	{
	    ?>
	    
		<hr>
	    
		<div style="font-size: 8pt; margin-bottom: 5px;">
		    
		</div>
	    <table border="0" cellpadding="0" cellspacing="0" width="100%">
	    <tr>
	    <td width="1%" style="vertical-align: top; padding-right: 15px; font-size: 10pt;">
		Categories:
	    </td>
	    <td>
		<table id="wiki_cat_table" border="0" cellpadding="0" cellspacing="0" width="100%">
	    
	    <?
	    
	    $b=0;
	    
	    for ($i=0; $i<count($displayParams["aEditCategory"]["aCategory"]); $i++)
	    {

		if ($b==0)
		{
		    echo "<tr>";
		}
		
		?>
		    <td width="1%">
			<input name="<?=$displayParams["aEditCategory"]["name"];?>" type="<?=$displayParams["aEditCategory"]["sType"];?>" value="<?=$displayParams["aEditCategory"]["aCategory"][$i]["ID"];?>" <?=$displayParams["aEditCategory"]["aCategory"][$i]["state"];?>>
		    </td>
		    
		    <td valign="middle" align="left">
			<?=$displayParams["aEditCategory"]["aCategory"][$i]["title"];?>
		    </td>
		<?
		
		if ($b==2)
		{
		    echo "</tr>";
		    $b=-1;
		}
		
		$b++;
	    }
	    
	    ?>
	    
	    </table>
	    </td>
	    </tr>
	    </table>
	    
	    <?

	}

	if ($displayParams["bIsPreview"])
	{

	    ?>

	    <div class="wiki_preview">
	    <?
	    if ($displayParams["aWarning"]["bDisplayWarning"])
	    {
		?>
		<div class="wiki_general_padding">
		    <div class="wiki_warning">
			<?=$displayParams["aWarning"]["sMesg"];?>
		    </div>
		</div>
		<?
	    }
	    ?>

		<?=$displayParams["sBody"];?>
	    </div>


	    <?
	}
	
	if (is_array($displayParams["aEditorChange"]))
	{
	    if ($displayParams["aEditorChange"]["bShowChangeLink"]==1)
	    {
		/*		<div style="padding-top: 10px; padding-bottom: 10px;"><a href="<?=$displayParams["aEditorChange"]["sShowChangeLink"];?>"><?=$displayParams["aEditorChange"]["sShowChangeText"];?></a></div>
			*/
		?>
		<?
	    }
	}


	?>
    </form>
    <?
}


?>
</div>
